home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Very Best of Atari Inside
/
The Very Best of Atari Inside 1.iso
/
mint
/
mntlib43
/
mntlib
/
strpbrk.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-09-17
|
472b
|
23 lines
/* from Henry Spencer's stringlib */
#include <string.h>
/*
* strpbrk - find first occurrence of any char from breakat in s
*/
char * /* found char, or NULL if none */
strpbrk(s, breakat)
const char *s;
const char *breakat;
{
register const char *sscan;
register const char *bscan;
for (sscan = s; *sscan != '\0'; sscan++) {
for (bscan = breakat; *bscan != '\0';) /* ++ moved down. */
if (*sscan == *bscan++)
return((char *)sscan);
}
return(NULL);
}